using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._ToCAD
{
    /// <summary>
    /// <para>Export to CAD</para>
    /// <para>Creates one or more CAD drawings based on the values contained in one or more input feature classes or feature layers and supporting tables.</para>
    /// <para>根据一个或多个输入要素类或要素图层和支持表中包含的值创建一个或多个 CAD 工程图。</para>
    /// </summary>    
    [DisplayName("Export to CAD")]
    public class ExportCAD : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportCAD()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>A collection of feature classes and/or feature layers whose geometry will be exported to one or more CAD files.</para>
        /// <para>要素类和/或要素图层的集合，其几何将导出为一个或多个 CAD 文件。</para>
        /// </param>
        /// <param name="_Output_Type">
        /// <para>Output Type</para>
        /// <para><xdoc>
        ///   <para>The CAD platform and file version of the output files. This value overrides any Output_Type values contained in the keyname column or alias column CADFile_type.</para>
        ///   <bulletList>
        ///     <bullet_item>Microstation DGN file—Microstation DGN file</bullet_item><para/>
        ///     <bullet_item>DWG version 2018—DWG version 2018</bullet_item><para/>
        ///     <bullet_item>DWG version 2013—DWG version 2013</bullet_item><para/>
        ///     <bullet_item>DWG version 2010—DWG version 2010</bullet_item><para/>
        ///     <bullet_item>DWG version 2007—DWG version 2007</bullet_item><para/>
        ///     <bullet_item>DWG version 2005—DWG version 2005</bullet_item><para/>
        ///     <bullet_item>DWG version 2004—DWG version 2004</bullet_item><para/>
        ///     <bullet_item>DWG version 2000—DWG version 2000</bullet_item><para/>
        ///     <bullet_item>DWG version 14—DWG version 14</bullet_item><para/>
        ///     <bullet_item>DXF version 2018—DXF version 2018</bullet_item><para/>
        ///     <bullet_item>DXF version 2013—DXF version 2013</bullet_item><para/>
        ///     <bullet_item>DXF version 2010—DXF version 2010</bullet_item><para/>
        ///     <bullet_item>DXF version 2007—DXF version 2007</bullet_item><para/>
        ///     <bullet_item>DXF version 2005—DXF version 2005</bullet_item><para/>
        ///     <bullet_item>DXF version 2004—DXF version 2004</bullet_item><para/>
        ///     <bullet_item>DXF version 2000—DXF version 2000</bullet_item><para/>
        ///     <bullet_item>DXF version 14—DXF version 14</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出文件的 CAD 平台和文件版本。此值将覆盖 keyname 列或别名列CADFile_type中包含的任何Output_Type值。</para>
        ///   <bulletList>
        ///     <bullet_item>Microstation DGN 文件 - Microstation DGN 文件</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2018 - DWG 版本 2018</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2013 - DWG 版本 2013</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2010 - DWG 版本 2010</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2007 - DWG 版本 2007</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2005 - DWG 版本 2005</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2004 - DWG 版本 2004</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2000 - DWG 版本 2000</bullet_item><para/>
        ///     <bullet_item>DWG 版本 14 - DWG 版本 14</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2018 - DXF 版本 2018</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2013 - DXF 版本 2013</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2010 - DXF 版本 2010</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2007 - DXF 版本 2007</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2005 - DXF 版本 2005</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2004 - DXF 版本 2004</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2000 - DXF 版本 2000</bullet_item><para/>
        ///     <bullet_item>DXF 版本 14 - DXF 版本 14</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_Output_File">
        /// <para>Output File</para>
        /// <para>The path of the desired output CAD drawing file. This name overrides any drawing name information included in the input features columns or alias columns named DrawingPathName.</para>
        /// <para>所需输出 CAD 图形文件的路径。此名称将覆盖名为 DrawingPathName 的输入要素列或别名列中包含的任何图形名称信息。</para>
        /// </param>
        public ExportCAD(List<object> _in_features, _Output_Type_value _Output_Type, object _Output_File)
        {
            this._in_features = _in_features;
            this._Output_Type = _Output_Type;
            this._Output_File = _Output_File;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "Export to CAD";

        public override string CallName => "conversion.ExportCAD";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _Output_Type.GetGPValue(), _Output_File, _Ignore_FileNames.GetGPValue(), _Append_To_Existing.GetGPValue(), _Seed_File];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>A collection of feature classes and/or feature layers whose geometry will be exported to one or more CAD files.</para>
        /// <para>要素类和/或要素图层的集合，其几何将导出为一个或多个 CAD 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_features { get; set; }


        /// <summary>
        /// <para>Output Type</para>
        /// <para><xdoc>
        ///   <para>The CAD platform and file version of the output files. This value overrides any Output_Type values contained in the keyname column or alias column CADFile_type.</para>
        ///   <bulletList>
        ///     <bullet_item>Microstation DGN file—Microstation DGN file</bullet_item><para/>
        ///     <bullet_item>DWG version 2018—DWG version 2018</bullet_item><para/>
        ///     <bullet_item>DWG version 2013—DWG version 2013</bullet_item><para/>
        ///     <bullet_item>DWG version 2010—DWG version 2010</bullet_item><para/>
        ///     <bullet_item>DWG version 2007—DWG version 2007</bullet_item><para/>
        ///     <bullet_item>DWG version 2005—DWG version 2005</bullet_item><para/>
        ///     <bullet_item>DWG version 2004—DWG version 2004</bullet_item><para/>
        ///     <bullet_item>DWG version 2000—DWG version 2000</bullet_item><para/>
        ///     <bullet_item>DWG version 14—DWG version 14</bullet_item><para/>
        ///     <bullet_item>DXF version 2018—DXF version 2018</bullet_item><para/>
        ///     <bullet_item>DXF version 2013—DXF version 2013</bullet_item><para/>
        ///     <bullet_item>DXF version 2010—DXF version 2010</bullet_item><para/>
        ///     <bullet_item>DXF version 2007—DXF version 2007</bullet_item><para/>
        ///     <bullet_item>DXF version 2005—DXF version 2005</bullet_item><para/>
        ///     <bullet_item>DXF version 2004—DXF version 2004</bullet_item><para/>
        ///     <bullet_item>DXF version 2000—DXF version 2000</bullet_item><para/>
        ///     <bullet_item>DXF version 14—DXF version 14</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出文件的 CAD 平台和文件版本。此值将覆盖 keyname 列或别名列CADFile_type中包含的任何Output_Type值。</para>
        ///   <bulletList>
        ///     <bullet_item>Microstation DGN 文件 - Microstation DGN 文件</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2018 - DWG 版本 2018</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2013 - DWG 版本 2013</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2010 - DWG 版本 2010</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2007 - DWG 版本 2007</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2005 - DWG 版本 2005</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2004 - DWG 版本 2004</bullet_item><para/>
        ///     <bullet_item>DWG 版本 2000 - DWG 版本 2000</bullet_item><para/>
        ///     <bullet_item>DWG 版本 14 - DWG 版本 14</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2018 - DXF 版本 2018</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2013 - DXF 版本 2013</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2010 - DXF 版本 2010</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2007 - DXF 版本 2007</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2005 - DXF 版本 2005</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2004 - DXF 版本 2004</bullet_item><para/>
        ///     <bullet_item>DXF 版本 2000 - DXF 版本 2000</bullet_item><para/>
        ///     <bullet_item>DXF 版本 14 - DXF 版本 14</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Output_Type_value _Output_Type { get; set; }

        public enum _Output_Type_value
        {
            /// <summary>
            /// <para>Microstation DGN file</para>
            /// <para>Microstation DGN file—Microstation DGN file</para>
            /// <para>Microstation DGN 文件 - Microstation DGN 文件</para>
            /// </summary>
            [Description("Microstation DGN file")]
            [GPEnumValue("DGN_V8")]
            _DGN_V8,

            /// <summary>
            /// <para>DWG version 14</para>
            /// <para>DWG version 14—DWG version 14</para>
            /// <para>DWG 版本 14 - DWG 版本 14</para>
            /// </summary>
            [Description("DWG version 14")]
            [GPEnumValue("DWG_R14")]
            _DWG_R14,

            /// <summary>
            /// <para>DWG version 2000</para>
            /// <para>DWG version 2000—DWG version 2000</para>
            /// <para>DWG 版本 2000 - DWG 版本 2000</para>
            /// </summary>
            [Description("DWG version 2000")]
            [GPEnumValue("DWG_R2000")]
            _DWG_R2000,

            /// <summary>
            /// <para>DXF version 14</para>
            /// <para>DXF version 14—DXF version 14</para>
            /// <para>DXF 版本 14 - DXF 版本 14</para>
            /// </summary>
            [Description("DXF version 14")]
            [GPEnumValue("DXF_R14")]
            _DXF_R14,

            /// <summary>
            /// <para>DXF version 2000</para>
            /// <para>DXF version 2000—DXF version 2000</para>
            /// <para>DXF 版本 2000 - DXF 版本 2000</para>
            /// </summary>
            [Description("DXF version 2000")]
            [GPEnumValue("DXF_R2000")]
            _DXF_R2000,

            /// <summary>
            /// <para>DWG version 2004</para>
            /// <para>DWG version 2004—DWG version 2004</para>
            /// <para>DWG 版本 2004 - DWG 版本 2004</para>
            /// </summary>
            [Description("DWG version 2004")]
            [GPEnumValue("DWG_R2004")]
            _DWG_R2004,

            /// <summary>
            /// <para>DXF version 2004</para>
            /// <para>DXF version 2004—DXF version 2004</para>
            /// <para>DXF 版本 2004 - DXF 版本 2004</para>
            /// </summary>
            [Description("DXF version 2004")]
            [GPEnumValue("DXF_R2004")]
            _DXF_R2004,

            /// <summary>
            /// <para>DWG version 2005</para>
            /// <para>DWG version 2005—DWG version 2005</para>
            /// <para>DWG 版本 2005 - DWG 版本 2005</para>
            /// </summary>
            [Description("DWG version 2005")]
            [GPEnumValue("DWG_R2005")]
            _DWG_R2005,

            /// <summary>
            /// <para>DXF version 2005</para>
            /// <para>DXF version 2005—DXF version 2005</para>
            /// <para>DXF 版本 2005 - DXF 版本 2005</para>
            /// </summary>
            [Description("DXF version 2005")]
            [GPEnumValue("DXF_R2005")]
            _DXF_R2005,

            /// <summary>
            /// <para>DWG version 2007</para>
            /// <para>DWG version 2007—DWG version 2007</para>
            /// <para>DWG 版本 2007 - DWG 版本 2007</para>
            /// </summary>
            [Description("DWG version 2007")]
            [GPEnumValue("DWG_R2007")]
            _DWG_R2007,

            /// <summary>
            /// <para>DXF version 2007</para>
            /// <para>DXF version 2007—DXF version 2007</para>
            /// <para>DXF 版本 2007 - DXF 版本 2007</para>
            /// </summary>
            [Description("DXF version 2007")]
            [GPEnumValue("DXF_R2007")]
            _DXF_R2007,

            /// <summary>
            /// <para>DWG version 2010</para>
            /// <para>DWG version 2010—DWG version 2010</para>
            /// <para>DWG 版本 2010 - DWG 版本 2010</para>
            /// </summary>
            [Description("DWG version 2010")]
            [GPEnumValue("DWG_R2010")]
            _DWG_R2010,

            /// <summary>
            /// <para>DXF version 2010</para>
            /// <para>DXF version 2010—DXF version 2010</para>
            /// <para>DXF 版本 2010 - DXF 版本 2010</para>
            /// </summary>
            [Description("DXF version 2010")]
            [GPEnumValue("DXF_R2010")]
            _DXF_R2010,

            /// <summary>
            /// <para>DWG version 2013</para>
            /// <para>DWG version 2013—DWG version 2013</para>
            /// <para>DWG 版本 2013 - DWG 版本 2013</para>
            /// </summary>
            [Description("DWG version 2013")]
            [GPEnumValue("DWG_R2013")]
            _DWG_R2013,

            /// <summary>
            /// <para>DXF version 2013</para>
            /// <para>DXF version 2013—DXF version 2013</para>
            /// <para>DXF 版本 2013 - DXF 版本 2013</para>
            /// </summary>
            [Description("DXF version 2013")]
            [GPEnumValue("DXF_R2013")]
            _DXF_R2013,

            /// <summary>
            /// <para>DWG version 2018</para>
            /// <para>DWG version 2018—DWG version 2018</para>
            /// <para>DWG 版本 2018 - DWG 版本 2018</para>
            /// </summary>
            [Description("DWG version 2018")]
            [GPEnumValue("DWG_R2018")]
            _DWG_R2018,

            /// <summary>
            /// <para>DXF version 2018</para>
            /// <para>DXF version 2018—DXF version 2018</para>
            /// <para>DXF 版本 2018 - DXF 版本 2018</para>
            /// </summary>
            [Description("DXF version 2018")]
            [GPEnumValue("DXF_R2018")]
            _DXF_R2018,

        }

        /// <summary>
        /// <para>Output File</para>
        /// <para>The path of the desired output CAD drawing file. This name overrides any drawing name information included in the input features columns or alias columns named DrawingPathName.</para>
        /// <para>所需输出 CAD 图形文件的路径。此名称将覆盖名为 DrawingPathName 的输入要素列或别名列中包含的任何图形名称信息。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_File { get; set; }


        /// <summary>
        /// <para>Ignore Paths in Tables</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the function will ignore or use the paths in the DrawingPathName. This allows the function to output CAD entities to specific drawings or ignore this and add to one CAD file.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The paths in the document entity fields will be ignored and the output of all entities will be added to a single CAD file. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The paths in the document entity fields and each entity's path will be used so that each CAD part will be written to a separate file.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定函数是忽略还是使用 DrawingPathName 中的路径。这允许该函数将 CAD 实体输出到特定图形或忽略此图元并添加到一个 CAD 文件中。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 文档实体字段中的路径将被忽略，所有图元的输出将被添加到单个 CAD 文件中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将使用文档实体字段中的路径和每个实体的路径，以便将每个 CAD 零件写入单独的文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ignore Paths in Tables")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Ignore_FileNames_value _Ignore_FileNames { get; set; } = _Ignore_FileNames_value._true;

        public enum _Ignore_FileNames_value
        {
            /// <summary>
            /// <para>Ignore_Filenames_in_Tables</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Ignore_Filenames_in_Tables")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>Use_Filenames_in_Tables</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Use_Filenames_in_Tables")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Append to Existing Files</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output will be appended to an existing CAD file. This allows you to add information to a CAD file on disk.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output file content will be added to an existing output CAD file. The existing CAD file content will not be lost.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output file content will overwrite the existing CAD file content. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将输出追加到现有 CAD 文件。这允许您将信息添加到磁盘上的 CAD 文件。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出文件内容将添加到现有输出 CAD 文件中。现有的 CAD 文件内容不会丢失。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出文件内容将覆盖现有 CAD 文件内容。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append to Existing Files")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Append_To_Existing_value _Append_To_Existing { get; set; } = _Append_To_Existing_value._false;

        public enum _Append_To_Existing_value
        {
            /// <summary>
            /// <para>Append_To_Existing_Files</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Append_To_Existing_Files")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>Overwrite_Existing_Files</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Overwrite_Existing_Files")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Seed File</para>
        /// <para>An existing CAD drawing whose contents and document and layer properties will be used for all new output CAD files. The CAD platform and format version of the seed file overrides the value specified by the Output Type parameter. If appending to existing CAD files, the seed drawing is ignored.</para>
        /// <para>现有 CAD 工程图，其内容以及文档和图层属性将用于所有新的输出 CAD 文件。种子文件的 CAD 平台和格式版本将覆盖输出类型参数指定的值。如果追加到现有 CAD 文件，则种子图形将被忽略。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Seed File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Seed_File { get; set; } = null;


        public ExportCAD SetEnv(object extent = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}